Conversation
Co-authored-by: MrOrz <108608+MrOrz@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Code Review
This pull request introduces project-wide linting and formatting standards by integrating Husky, lint-staged, and Ruff. It also includes various code cleanups, such as removing unused imports in the Python backend and standardizing formatting across TypeScript and YAML files. Feedback is provided regarding the exclusion of YAML files from Prettier and a potential logic change in the chat cache where switching from nullish coalescing to logical OR might unintentionally overwrite empty string values.
| *.yaml | ||
| *.yml |
There was a problem hiding this comment.
It's generally a good practice to format configuration files like docker-compose.yml to ensure consistency across the project. By adding *.yaml and *.yml to .prettierignore, you are excluding all YAML files from formatting. This might be unintentional, especially since docker-compose.yml was modified in this PR with what appear to be formatting changes.
I recommend removing these lines to allow Prettier to format YAML files. You can then add a rule for YAML files to your lint-staged configuration in package.json to automatically format them on commit.
| id: genId(), | ||
| role: 'model', | ||
| author: event.author ?? 'writer', | ||
| author: event.author || 'writer', |
There was a problem hiding this comment.
The change from the nullish coalescing operator (??) to the logical OR operator (||) alters the behavior for empty strings. If event.author is an empty string (""), ?? would preserve it, while || will replace it with 'writer'.
If an empty string is a valid value for an author, this change introduces a bug. Using ?? is generally safer as it only provides a default for null or undefined, making the code's intent clearer and less prone to unintended side effects with other falsy values (like an empty string). This same issue appears on lines 253 and 269.
| author: event.author || 'writer', | |
| author: event.author ?? 'writer', |
ruffas a dev dependency (uv add --dev ruff) inside./adkand locked its version inpyproject.tomlanduv.lock.huskyandlint-staged.lint-stagedblocks inpackage.jsonto properly invoke TS formatting checks via ESLint & Prettier and Python checks viauv run ruffusing bash wrappers to handle staged file path context correctly..github/workflows/ci.ymltriggering on pushes/PRs to main. It runs concurrent jobs to validate Node.js (TS/Lint/Formatting) viapnpmand Python components (Ruff format/check) viauv.eslint.config.jsto ignore the python virtual environment.vitestinvocation to pass successfully without failing the pipeline if no test cases are currently matched.PR created automatically by Jules for task 2951186506235151312 started by @MrOrz